package list;

/**
 * @Author wy
 * @Description TODO
 * @Date 2023/6/8 14:10
 * @Version 1.0
 */
public class PrintNodeUtil {
    public static void show(ListNode head){
        if(head==null){
            System.out.println("空链表");
        }else{
            ListNode temp=head;
            while(temp!=null){
                System.out.print(temp.val+"\t");
                //移后移动一个
                temp=temp.next;
            }
            System.out.println();
        }
    }
}
